layui.use(["jquery", "element"], function() {
    let $ = (jquery = layui.jquery);
    let element = layui.element;
    $.get("json/sideNav.json").then(data => {
        let txt = template("tmplNav", data);
        $("#main-nav").append(txt);
        $("#main-nav li:eq(0)").addClass("layui-nav-itemed");
        $("#main-nav li:eq(0) dd:eq(0)").addClass("layui-this");
        element.render("nav");
    });
});
